import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter, HostListener } from '@angular/core';
import { animate, state, style, transition, trigger } from '@angular/animations';

@Component({
  selector: 'app-navbar1',
  templateUrl: './app-navbar.component.html',
  animations: [
    trigger('fadeInOutTranslate', [
      state('in', style({ display: 'block' })),
      state('out', style({ display: 'none' })),
      transition('in<=>out', [
        animate(0)
      ]),
    ]),
  ],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class AppNavBarComponent implements OnInit {

  stateString: String = 'out';
  stateString1: String = 'out';


  constructor() { }

  ngOnInit() { }

  popMenu(value: any) {
    if (value == 0) {
      this.stateString = 'in';
    }
    if (value == 1) {
      this.stateString1 = 'in';
    }
  }

  hideMenu(value: any) {
    if (value == 0) {
      this.stateString = 'out';
    }
    if (value == 1) {
      this.stateString1 = 'out';
    }
  }
}